package com.htfyun.pdfview;

/**
 * Created by sst on 2018/1/23.
 */

import android.graphics.Bitmap;
import android.view.View;

/**
 * 这个是为了兼容手机和 eink 的书写, 方便测试用
 */
public interface IPWSurfaceView {

    public static final int MAX_PEN_WIDTH_PIXEL = 4;
    public static final int MIN_PEN_WIDTH_PIXEL = 0;
    
    public static final int WT_TYPE_UNKNOW = -1;
    public static final int WT_TYPE_NONE = -1;
    public static final int WT_TYPE_INTERSECTED = 0;
    public static final int WT_TYPE_MATTS = 1;
    public static final int WT_TYPE_LINEFIGURE = 2;
    
    public static final int DRAW_OBJ_RANDOM = 0;
    public static final int DRAW_OBJ_LINE = 1;
    public static final int DRAW_OBJ_TRIANGLE = 2;
    public static final int DRAW_OBJ_CIRCLE = 3;
    public static final int DRAW_OBJ_RECTANGLE = 4;
    public static final int DRAW_OBJ_ERASE = 5;
    public static final int DRAW_OBJ_UNDO = 6;
    
    /**
     * 把自己的那个PW View 传进来后, 强制转为自己的.
     * @param view
     */
    //注掉他, 是希望在继承类的构造函数中传入.
//    void setPWView(View view);

    /**
     * 手写关键是获取这个bitmap
     * @return
     */
    Bitmap getBitmap();

    /**
     * 清掉缓存的笔画
     */
    void clear();

    void undo();

    /**
     * 这个是针对 Eink 的 OwnerSurfaceView
     * @param hostView
     */
    void setHostView(View hostView);

    /**
     * 跟 android 的View 一样的. 
     * @param visibility
     */
    void setVisibility(int visibility);

    /**
     * 这个是针对 Eink 的 OwnerSurfaceView
     * @param drawObjectType
     */
    void setDrawObjectType(int drawObjectType);
    
    int getDrawObjectType();

    /**
     * 这个是针对 Eink 的 OwnerSurfaceView
     * @param penSettingWidth
     */
    void setPenSettingWidth(int penSettingWidth);

    int getPenSettingWidth();
    
}
